package com.aaa.ss.service;

import com.aaa.common.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

//name 必须和被调用者注册到到注册中心的应用名称一致
@FeignClient(name = "orderService")
public interface OrderService {

    //远程订单调用方法
    //1.遵循restfull风格，请求方式必须和资源方式一致
    //2.返回值需要和被调用方法返回值一致
    //3.请求路径，必须和被调用者请求路径一致
    @GetMapping("/order/queryAll")
    //@RequestMapping(name = "order/queryAll",method = RequestMethod.GET)
    List<Order> getAll();
}
